import 'package:json_annotation/json_annotation.dart';
part 'token_data.g.dart';
/**
 *
 * @ProjectName:    login_model
 * @ClassName:      token_data
 * @Description:    dart类作用描述
 * @Author:         孙浩
 * @QQ:             243280864
 * @CreateDate:     2021/1/8 11:12 PM
 */
@JsonSerializable()
class TokenData extends Object {

  @JsonKey(name: 'data')
  Data data;

  TokenData(this.data,);

  factory TokenData.fromJson(Map<String, dynamic> srcJson) => _$TokenDataFromJson(srcJson);

  Map<String, dynamic> toJson() => _$TokenDataToJson(this);

}


@JsonSerializable()
class Data extends Object {

  @JsonKey(name: 'accessToken')
  String accessToken;

  @JsonKey(name: 'refreshToken')
  String refreshToken;

  Data(this.accessToken,this.refreshToken,);

  factory Data.fromJson(Map<String, dynamic> srcJson) => _$DataFromJson(srcJson);

  Map<String, dynamic> toJson() => _$DataToJson(this);

}
